
/*---------------------------------------------------------
   Init( data table )
---------------------------------------------------------*/
function EFFECT:Init( data )

	self.Pos = data:GetOrigin()
	self.Ang = data:GetAngle()
	self.Emitter = ParticleEmitter( self.Pos )
	self.Time = CurTime() + 7
	
end

/*---------------------------------------------------------
   THINK
---------------------------------------------------------*/
function EFFECT:Think( )

	if self.Emitter == nil then return false end
	if self.Time < CurTime() then self.Emitter:Finish() return false end
	
	for i=0,math.random(1,3) do
		local particle = self.Emitter:Add( "effects/yellowflare", self.Pos)
		local num = math.random(150,200)

		particle:SetVelocity( self.Ang:Forward() * math.Rand(-150,-100) + (VectorRand() * math.Rand(10,90))  )
		particle:SetDieTime( math.Rand(1,1.5) )
		particle:SetStartAlpha( math.Rand( 150, 200 ) )
		particle:SetEndAlpha( 50 )
		particle:SetStartSize( math.Rand(1,1.7) )
		particle:SetEndSize( 0 )
		particle:SetRoll( math.random(1,180) )
		particle:SetRollDelta( 0.1 )
		particle:SetColor( num + 10, num, 0 )
		
		particle:SetAirResistance( 50 )
		particle:SetGravity( Vector( 0, 0, -200 ) )
		particle:SetCollide( true )
		particle:SetBounce( .9 )
	end
	return true
end

/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render( )

end
